Optimal. Leaf size=348 \[ \frac {\sqrt {a+b} (b B-2 a C) \cot (c+d x) \sqrt {\frac {b (1-\sec (c+d x))}{a+b}} \sqrt {-\frac {b (\sec (c+d x)+1)}{a-b}} \Pi \left (\frac {a+b}{a};\sin ^{-1}\left (\frac {\sqrt {a+b \sec (c+d x)}}{\sqrt {a+b}}\right )|\frac {a+b}{a-b}\right )}{a^2 d}+\frac {B \sin (c+d x) \sqrt {a+b \sec (c+d x)}}{a d}+\frac {B \sqrt {a+b} \cot (c+d x) \sqrt {\frac {b (1-\sec (c+d x))}{a+b}} \sqrt {-\frac {b (\sec (c+d x)+1)}{a-b}} F\left (\sin ^{-1}\left (\frac {\sqrt {a+b \sec (c+d x)}}{\sqrt {a+b}}\right )|\frac {a+b}{a-b}\right )}{a d}+\frac {B (a-b) \sqrt {a+b} \cot (c+d x) \sqrt {\frac {b (1-\sec (c+d x))}{a+b}} \sqrt {-\frac {b (\sec (c+d x)+1)}{a-b}} E\left (\sin ^{-1}\left (\frac {\sqrt {a+b \sec (c+d x)}}{\sqrt {a+b}}\right )|\frac {a+b}{a-b}\right )}{a b d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.50, antiderivative size = 348, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 7, integrand size = 42, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.167, Rules used = {4072, 4034, 4059, 3921, 3784, 3832, 4004} \[ \frac {\sqrt {a+b} (b B-2 a C) \cot (c+d x) \sqrt {\frac {b (1-\sec (c+d x))}{a+b}} \sqrt {-\frac {b (\sec (c+d x)+1)}{a-b}} \Pi \left (\frac {a+b}{a};\sin ^{-1}\left (\frac {\sqrt {a+b \sec (c+d x)}}{\sqrt {a+b}}\right )|\frac {a+b}{a-b}\right )}{a^2 d}+\frac {B \sin (c+d x) \sqrt {a+b \sec (c+d x)}}{a d}+\frac {B \sqrt {a+b} \cot (c+d x) \sqrt {\frac {b (1-\sec (c+d x))}{a+b}} \sqrt {-\frac {b (\sec (c+d x)+1)}{a-b}} F\left (\sin ^{-1}\left (\frac {\sqrt {a+b \sec (c+d x)}}{\sqrt {a+b}}\right )|\frac {a+b}{a-b}\right )}{a d}+\frac {B (a-b) \sqrt {a+b} \cot (c+d x) \sqrt {\frac {b (1-\sec (c+d x))}{a+b}} \sqrt {-\frac {b (\sec (c+d x)+1)}{a-b}} E\left (\sin ^{-1}\left (\frac {\sqrt {a+b \sec (c+d x)}}{\sqrt {a+b}}\right )|\frac {a+b}{a-b}\right )}{a b d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3784
Rule 3832
Rule 3921
Rule 4004
Rule 4034
Rule 4059
Rule 4072
Rubi steps
\begin {align*} \int \frac {\cos ^2(c+d x) \left (B \sec (c+d x)+C \sec ^2(c+d x)\right )}{\sqrt {a+b \sec (c+d x)}} \, dx &=\int \frac {\cos (c+d x) (B+C \sec (c+d x))}{\sqrt {a+b \sec (c+d x)}} \, dx\\ &=\frac {B \sqrt {a+b \sec (c+d x)} \sin (c+d x)}{a d}-\frac {\int \frac {\frac {1}{2} (b B-2 a C)+\frac {1}{2} b B \sec ^2(c+d x)}{\sqrt {a+b \sec (c+d x)}} \, dx}{a}\\ &=\frac {B \sqrt {a+b \sec (c+d x)} \sin (c+d x)}{a d}-\frac {\int \frac {\frac {1}{2} (b B-2 a C)-\frac {1}{2} b B \sec (c+d x)}{\sqrt {a+b \sec (c+d x)}} \, dx}{a}-\frac {(b B) \int \frac {\sec (c+d x) (1+\sec (c+d x))}{\sqrt {a+b \sec (c+d x)}} \, dx}{2 a}\\ &=\frac {(a-b) \sqrt {a+b} B \cot (c+d x) E\left (\sin ^{-1}\left (\frac {\sqrt {a+b \sec (c+d x)}}{\sqrt {a+b}}\right )|\frac {a+b}{a-b}\right ) \sqrt {\frac {b (1-\sec (c+d x))}{a+b}} \sqrt {-\frac {b (1+\sec (c+d x))}{a-b}}}{a b d}+\frac {B \sqrt {a+b \sec (c+d x)} \sin (c+d x)}{a d}+\frac {(b B) \int \frac {\sec (c+d x)}{\sqrt {a+b \sec (c+d x)}} \, dx}{2 a}-\frac {(b B-2 a C) \int \frac {1}{\sqrt {a+b \sec (c+d x)}} \, dx}{2 a}\\ &=\frac {(a-b) \sqrt {a+b} B \cot (c+d x) E\left (\sin ^{-1}\left (\frac {\sqrt {a+b \sec (c+d x)}}{\sqrt {a+b}}\right )|\frac {a+b}{a-b}\right ) \sqrt {\frac {b (1-\sec (c+d x))}{a+b}} \sqrt {-\frac {b (1+\sec (c+d x))}{a-b}}}{a b d}+\frac {\sqrt {a+b} B \cot (c+d x) F\left (\sin ^{-1}\left (\frac {\sqrt {a+b \sec (c+d x)}}{\sqrt {a+b}}\right )|\frac {a+b}{a-b}\right ) \sqrt {\frac {b (1-\sec (c+d x))}{a+b}} \sqrt {-\frac {b (1+\sec (c+d x))}{a-b}}}{a d}+\frac {\sqrt {a+b} (b B-2 a C) \cot (c+d x) \Pi \left (\frac {a+b}{a};\sin ^{-1}\left (\frac {\sqrt {a+b \sec (c+d x)}}{\sqrt {a+b}}\right )|\frac {a+b}{a-b}\right ) \sqrt {\frac {b (1-\sec (c+d x))}{a+b}} \sqrt {-\frac {b (1+\sec (c+d x))}{a-b}}}{a^2 d}+\frac {B \sqrt {a+b \sec (c+d x)} \sin (c+d x)}{a d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] time = 16.64, size = 1027, normalized size = 2.95 \[ \frac {\sqrt {b+a \cos (c+d x)} \sqrt {\sec (c+d x)} \sqrt {\frac {1}{1-\tan ^2\left (\frac {1}{2} (c+d x)\right )}} \sqrt {1-\tan ^2\left (\frac {1}{2} (c+d x)\right )} \left (-a \sqrt {\frac {b-a}{a+b}} B \sqrt {1-\tan ^2\left (\frac {1}{2} (c+d x)\right )} \tan ^3\left (\frac {1}{2} (c+d x)\right )+b \sqrt {\frac {b-a}{a+b}} B \sqrt {1-\tan ^2\left (\frac {1}{2} (c+d x)\right )} \tan ^3\left (\frac {1}{2} (c+d x)\right )+2 i b B \Pi \left (-\frac {a+b}{a-b};i \sinh ^{-1}\left (\sqrt {\frac {b-a}{a+b}} \tan \left (\frac {1}{2} (c+d x)\right )\right )|\frac {a+b}{a-b}\right ) \sqrt {\frac {-a \tan ^2\left (\frac {1}{2} (c+d x)\right )+b \tan ^2\left (\frac {1}{2} (c+d x)\right )+a+b}{a+b}} \tan ^2\left (\frac {1}{2} (c+d x)\right )-4 i a C \Pi \left (-\frac {a+b}{a-b};i \sinh ^{-1}\left (\sqrt {\frac {b-a}{a+b}} \tan \left (\frac {1}{2} (c+d x)\right )\right )|\frac {a+b}{a-b}\right ) \sqrt {\frac {-a \tan ^2\left (\frac {1}{2} (c+d x)\right )+b \tan ^2\left (\frac {1}{2} (c+d x)\right )+a+b}{a+b}} \tan ^2\left (\frac {1}{2} (c+d x)\right )+a \sqrt {\frac {b-a}{a+b}} B \sqrt {1-\tan ^2\left (\frac {1}{2} (c+d x)\right )} \tan \left (\frac {1}{2} (c+d x)\right )+b \sqrt {\frac {b-a}{a+b}} B \sqrt {1-\tan ^2\left (\frac {1}{2} (c+d x)\right )} \tan \left (\frac {1}{2} (c+d x)\right )+2 i b B \Pi \left (-\frac {a+b}{a-b};i \sinh ^{-1}\left (\sqrt {\frac {b-a}{a+b}} \tan \left (\frac {1}{2} (c+d x)\right )\right )|\frac {a+b}{a-b}\right ) \sqrt {\frac {-a \tan ^2\left (\frac {1}{2} (c+d x)\right )+b \tan ^2\left (\frac {1}{2} (c+d x)\right )+a+b}{a+b}}-4 i a C \Pi \left (-\frac {a+b}{a-b};i \sinh ^{-1}\left (\sqrt {\frac {b-a}{a+b}} \tan \left (\frac {1}{2} (c+d x)\right )\right )|\frac {a+b}{a-b}\right ) \sqrt {\frac {-a \tan ^2\left (\frac {1}{2} (c+d x)\right )+b \tan ^2\left (\frac {1}{2} (c+d x)\right )+a+b}{a+b}}-i (a-b) B E\left (i \sinh ^{-1}\left (\sqrt {\frac {b-a}{a+b}} \tan \left (\frac {1}{2} (c+d x)\right )\right )|\frac {a+b}{a-b}\right ) \left (\tan ^2\left (\frac {1}{2} (c+d x)\right )+1\right ) \sqrt {\frac {-a \tan ^2\left (\frac {1}{2} (c+d x)\right )+b \tan ^2\left (\frac {1}{2} (c+d x)\right )+a+b}{a+b}}-2 i (b B-a C) F\left (i \sinh ^{-1}\left (\sqrt {\frac {b-a}{a+b}} \tan \left (\frac {1}{2} (c+d x)\right )\right )|\frac {a+b}{a-b}\right ) \left (\tan ^2\left (\frac {1}{2} (c+d x)\right )+1\right ) \sqrt {\frac {-a \tan ^2\left (\frac {1}{2} (c+d x)\right )+b \tan ^2\left (\frac {1}{2} (c+d x)\right )+a+b}{a+b}}\right )}{a \sqrt {\frac {b-a}{a+b}} d \sqrt {a+b \sec (c+d x)} \left (\tan ^2\left (\frac {1}{2} (c+d x)\right )+1\right )^{3/2} \sqrt {\frac {-a \tan ^2\left (\frac {1}{2} (c+d x)\right )+b \tan ^2\left (\frac {1}{2} (c+d x)\right )+a+b}{\tan ^2\left (\frac {1}{2} (c+d x)\right )+1}}} \]
Warning: Unable to verify antiderivative.
[In]
[Out]
________________________________________________________________________________________
fricas [F] time = 52.12, size = 0, normalized size = 0.00 \[ {\rm integral}\left (\frac {C \cos \left (d x + c\right )^{2} \sec \left (d x + c\right )^{2} + B \cos \left (d x + c\right )^{2} \sec \left (d x + c\right )}{\sqrt {b \sec \left (d x + c\right ) + a}}, x\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {{\left (C \sec \left (d x + c\right )^{2} + B \sec \left (d x + c\right )\right )} \cos \left (d x + c\right )^{2}}{\sqrt {b \sec \left (d x + c\right ) + a}}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 2.04, size = 1025, normalized size = 2.95 \[ \text {result too large to display} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {{\left (C \sec \left (d x + c\right )^{2} + B \sec \left (d x + c\right )\right )} \cos \left (d x + c\right )^{2}}{\sqrt {b \sec \left (d x + c\right ) + a}}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [F] time = 0.00, size = -1, normalized size = -0.00 \[ \int \frac {{\cos \left (c+d\,x\right )}^2\,\left (\frac {B}{\cos \left (c+d\,x\right )}+\frac {C}{{\cos \left (c+d\,x\right )}^2}\right )}{\sqrt {a+\frac {b}{\cos \left (c+d\,x\right )}}} \,d x \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\left (B + C \sec {\left (c + d x \right )}\right ) \cos ^{2}{\left (c + d x \right )} \sec {\left (c + d x \right )}}{\sqrt {a + b \sec {\left (c + d x \right )}}}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________